<!--
  描述：检修项目详情页
  @author chengguang
  @since 2021/11/19 14:45
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>新增或编辑分类</title>
</head>
<body>

<div class="layui-fluid">


    <div class="layui-card">
        <form method="post" action="" class="layui-form" lay-filter="zmn-form">

            <input type="hidden" name="maintainId" th:value="${maintainItem.maintainId}"/>
            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item" th:if="${maintainItem.maintainId > 0}">
                <label class="layui-form-label">ID：</label>
                <div class="layui-input-block">
                    <div class="layui-form-mid">
                        <span th:text="${maintainItem.maintainId}">ID</span>
                        <span th:text="${maintainItem.status == 2 ? '启用' : '禁用'}">status</span>
                    </div>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">检修项目名称：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 300px">
                        <input type="text" name="maintainName" th:value="${maintainItem.maintainName}" placeholder="检修项目名称"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="50"/>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">是否必检：</label>
                <div class="layui-input-inline" style="width:300px;">
                    <input  type="radio" name="isCheck"  value="2" title="是" th:checked="${maintainItem.isCheck == null || maintainItem.isCheck == 2}" lay-verify="required">
                    <input  type="radio" name="isCheck"  value="1" title="否" th:checked="${maintainItem.isCheck == 1}" lay-verify="required">
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">参考值：</label>
                <div class="layui-input-inline" style="width:300px;">
                    <input type="text" name="referenceValue" autocomplete="off" class="layui-input"
                           th:value="${maintainItem.referenceValue}" maxlength="50" lay-verify="required">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">选项值：</label>
                <div class="layui-input-inline" style="width:300px;">
                    <input type="text" name="selectValue0" autocomplete="off" class="layui-input"
                           th:value="${selectValue0}" maxlength="50" lay-verify="required">
                </div>
                <input type="radio" name="isNormal" lay-filter="isNormal" value="1" title="正常" th:checked="${isNormal1}">
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline" style="width:300px;">
                    <input type="text" name="selectValue1" autocomplete="off" class="layui-input"
                           th:value="${selectValue1}" maxlength="50" lay-verify="required">
                </div>
                <input type="radio" name="isNormal" lay-filter="isNormal" value="2" title="正常" th:checked="${isNormal2}">
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline" style="width:300px;">
                    <input type="text" name="selectValue2" autocomplete="off" class="layui-input"
                           th:value="${selectValue2}" maxlength="50">
                </div>

                <input type="radio" name="isNormal" lay-filter="isNormal" value="3" title="正常" th:checked="${isNormal3}">
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div>
                    <label style="color: #9F9F9F;width: 400px">注：选项值最少配两个,最多配三个,且不能重复</label>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">排序：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 300px">
                        <input type="text" name="sort" th:value="${maintainItem.sort}" placeholder="排序"
                               lay-verify="sort"
                               autocomplete="off" class="layui-input" maxlength="9"/>
                    </div>
                    <div>
                        <label style="color: #9F9F9F;width: 400px">排序值越小越靠前展示</label>
                    </div>
                </div>
            </div>
            </zmn>

            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交
                        </button>
                        <button onclick="zmnLayUtil.closeThisIframe(parent,{reloadPage: true})"
                                class="layui-btn layui-btn-primary" id="cancel">取消
                        </button>
                    </div>
                </div>
            </div>

        </form>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        MaintainItem: [[${maintainItem}]]
    };

    layui.config({
        base: "/static/lay/",
        version: 21234131112241414141
    }).extend({
        index: "lib/index",
        plat_maintainItem_detail: "base/maintainitem/zmn.plat.maintainItem.edit",
    }).use(['index', 'plat_maintainItem_detail']);

</script>
</body>
</html>